﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>时时彩开奖器</title>
    <meta name="viewport" content="width=device-width,user-scalable=no">
</head>
<body>
<div class="wrap">
    <div class="header clearfix">
        <a alt="" title="">

        </a>
        <h1>时时彩开奖器</h1>
    </div>
    <div class="login-content">
        <div class="pc-con">
            <div class="pc-activity" style="text-align:center;" align="center">
                <h1 style="display:block;color:#f00;margin:30% 30% 3% 30%;text-align:center;"
                    id="ssc_kaijiang_num"></h1>
                <h1 style="display:block;color:#f00;margin:0% 30% 3% 30%;text-align:center;"
                    id="mc_hk_kaijiang_num"></h1>

            </div>
        </div>
        <script src="https://code.jquery.com/jquery-1.11.3.js"></script>
        <script src="http://cdn.bootcss.com/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
        <script>
            function isNumber(value){
                //验证是否为数字类型
                var patrn = /^(-)?\d+(\.\d+)?$/;
                if(patrn.exec(value) == null || value == ""){
                    return false
                } else {
                    return true
                }
            }

            $(function () {
                var ssc_num = 0;
                var mc_hk_num = 0;
                //定时获取数据
                function ssc_kaijiang() {
                    var domain = "http://api.api68.com";
                    var tmp = [
                        '/ElevenFive/getElevenFiveInfo.do?lotCode=10006',                 //广东11选5
                        '/CQShiCai/getBaseCQShiCai.do?lotCode=10002',                     //重庆时时彩
                        '/pks/getLotteryPksInfo.do?lotCode=10001',                        //北京PK拾
                        '/QuanGuoCai/getLotteryInfo1.do?&lotCode=10043',                  //排列3
                        '/QuanGuoCai/getLotteryInfo1.do?&lotCode=10041',                  //福彩3D
                        '/CQShiCai/getBaseCQShiCai.do?lotCode=10003',                     //天津时时彩
                        '/gxklsf/getLotteryInfo.do?issue=&lotCode=10038',                    //广西十分彩
                        '/klsf/getLotteryInfo.do?issue=&lotCode=10005',                      //广东快乐十分
                        '/klsf/getLotteryInfo.do?issue=&lotCode=10034',                      //天津快乐十分
                        '/lotteryJSFastThree/getBaseJSFastThree.do?issue=&lotCode=10007', //上海时时乐（修改江苏快3）
                        '/LuckTwenty/getBaseLuckTewnty.do?issue=&lotCode=10014 ',        //北京快乐8
                        '/CQShiCai/getBaseCQShiCai.do?issue=&lotCode=10036',          //极速时时彩
                        '/pks/getLotteryPksInfo.do?issue=&lotCode=10037',         //极速赛车
                        '/pks/getLotteryPksInfo.do?issue=&lotCode=10035',         //极速飞艇
                        '/lotteryJSFastThree/getBaseJSFastThree.do?issue=&lotCode=10026',          //广西快3
                        '/lotteryJSFastThree/getBaseJSFastThree.do?issue=&lotCode=10027',          //吉林快3
                        '/klsf/getLotteryInfo.do?issue=&lotCode=10009',        //幸运农场
                    ];

                    for (var i = 0; i < tmp.length; i++) {
                        $.get(domain + tmp[i], function (data) {
                            dataObj = $.parseJSON(data);//解析返回的Json数据
                            var c_t = dataObj.result.data.preDrawIssue;//开奖期数
                            if(!isNumber(c_t)){
                                console.log('期数返回类型不正确，请重新调整！');
                                    return;
                            }
                            var c_r = dataObj.result.data.preDrawCode;//开奖结果
                            var lotcode = dataObj.result.data.lotCode;//彩票种类lotCode
                            var dataresult = new Array(c_t, c_r, lotcode);
                            if ($.cookie("qishu_" + lotcode) != c_t||$.cookie("qishu_" + lotcode)==null) {
                                //操作
                                $.post('get_data.php', {data: dataresult}, function () {

                                });
                                //设置cookie
                                $.cookie("qishu_" + lotcode, c_t, {expires: 7});
                            }
                        });
                    }
                    ssc_num++;
                    $("#ssc_kaijiang_num").text("时时彩开奖  已访问" + ssc_num + "次");

                }

                //定时判断是否中奖
                function mc_hk_kaijiang_num() {
                    $.post('check_data.php', {}, function () {
                        mc_hk_num++;
                        $("#mc_hk_kaijiang_num").text("时时彩中奖  已访问" + mc_hk_num + "次");
                    })
                }
                setInterval(ssc_kaijiang, 10000);

                setInterval(mc_hk_kaijiang_num, 10000);

            });
        </script>
</body>
</html>